import time

from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
goodsClassName = '商品分类测试'
testCase = "DBshop014"
firefox= openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
firefox.find_element_by_xpath('//p/a[5]').click()

firefox.find_element_by_xpath('//td[contains(.,"%s")]/following-sibling::td[4]/a[3]'%goodsClassName).click()
firefox.switch_to.alert.accept()
time.sleep(10)
try:
    firefox.find_element_by_xpath('//td[contains(.,"商品分类测试")]')
    writeLog('%s 测试失败'%testCase)
    getPhoto(firefox)
except:
    writeLog('%s 测试通过'%testCase)